function GetQueryString(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
    var r = window.location.search.substr(1).match(reg);
    if (r != null) return (r[2]);
    return null;
}
/*动态加载css、js和img*/
var dynamicLoading = {
	css: function(path){
		if(!path || path.length === 0){
			throw new Error('argument "path" is required !');

		}
		var timestamp=new Date().getTime();
		var head = document.getElementsByTagName('head')[0];
		var link = document.createElement('link');
		link.href = path+"?v="+timestamp;
		link.rel = 'stylesheet';
		link.type = 'text/css';
		head.appendChild(link);
	},
	js: function(path){
		if(!path || path.length === 0){
			throw new Error('argument "path" is required !');
		}
		var timestamp=new Date().getTime();
		// var body = document.getElementsByTagName('body')[0];
		var script = document.createElement('script');
		script.src = path+"?v="+timestamp;
		script.type = 'text/javascript';
		document.body.appendChild(script);
	},
	img: function(ver){
		$("img").each(function(i){
			let imgsec=$(this).attr("src");
			$(this).attr("src",imgsec+"?v="+ver);
		});
	}
}
